package com.szgr.baoyin.model;

import java.io.Serializable;

/**
 * Created by yang on 15/10/16.
 */
public class Product implements Serializable{
    private boolean isChecked;
    private String imgUrl;
    private String name;
    private String newPrice;
    private String oldPrice;
    private String count;   //商品数目
    private String goods_id;   //商品id
    private String cart_id;

    public Product(){

    }

    public boolean isChecked() {
        return isChecked;
    }

    public void setIsChecked(boolean isChecked) {
        this.isChecked = isChecked;
    }

    public String getImgUrl() {
        return imgUrl;
    }

    public void setImgUrl(String imgUrl) {
        this.imgUrl = imgUrl;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getNewPrice() {
        return newPrice;
    }

    public void setNewPrice(String newPrice) {
        this.newPrice = newPrice;
    }

    public String getOldPrice() {
        return oldPrice;
    }

    public void setOldPrice(String oldPrice) {
        this.oldPrice = oldPrice;
    }

    public String getCount() {
        return count;
    }

    public void setCount(String count) {
        this.count = count;
    }

    public String getGoods_id() {
        return goods_id;
    }

    public void setGoods_id(String goods_id) {
        this.goods_id = goods_id;
    }

    public String getCart_id() {
        return cart_id;
    }

    public void setCart_id(String cart_id) {
        this.cart_id = cart_id;
    }

    @Override
    public boolean equals(Object o) {
        if(o instanceof Product){
            Product p = (Product) o;
            if(this.getGoods_id().equals(p.getGoods_id())){
                return true;
            }
        }
        return false;
    }
}
